package com.yrh.service.impl;

import com.yrh.bean.TCategory;
import com.yrh.dao.TCategoryDao;
import com.yrh.dao.impl.TCategoryDaoImpl;
import com.yrh.service.TCategoryService;

import java.util.List;
/*餐品分类业务层接口实现类*/
public class TCategoryServiceImpl implements TCategoryService {
    private TCategoryDao dao=new TCategoryDaoImpl();
    @Override
    public List<TCategory> allCategory() {
        return dao.allCategory();
    }
    //查询餐品是否存在
    @Override
    public TCategory byName(String name){
        return dao.byName(name);
    }
/*更改菜品*/
    @Override
    public int updateCate(TCategory tCategory) {
        return dao.updateCate(tCategory);
    }
/*删除菜品*/
    @Override
    public int delCate(TCategory tCategory) {
        return dao.delCate(tCategory);
    }
/*添加菜品*/
    @Override
    public int addCate(TCategory tCategory) {
        return dao.addCate(tCategory);
    }
}
